#include <iostream>
#include <memory>

int main () 
{
   std::shared_ptr<int> foo = std::make_shared<int> (100);
   std::shared_ptr<int> foo2 (new int(100));

   auto bar = std::make_shared<int> (200);
   auto baz = std::make_shared<std::pair<int,int>> (300,400);

   std::cout << "*foo: " << *foo << '\n';
   std::cout << "*bar: " << *bar << '\n';
   std::cout << "*baz: " << baz->first << ' ' << baz->second << '\n';

   /* 实际项目中使用 */
   // pHdl = std::make_shared<sdk_functions::RecvSyncData>(_rIp);   /* RecvSyncData 是一个类 */

   return 0;
}

/*
	*foo: 100
	*bar: 200
	*baz: 300 400
*/
